package com.realtyManage.springboot.Dao;


import com.realtyManage.springboot.Model.Do.HouseFans;
import com.realtyManage.springboot.Model.Do.UserJurisdiction;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import javax.transaction.Transactional;

/**
 * 分配权限
 *
 * @author 杭州素色网络科技有限公司
 * @since 2019-010-09
 */

@Repository
public interface SysUserJurisdictionRepository extends JpaRepository<UserJurisdiction, Integer>, JpaSpecificationExecutor<UserJurisdiction> {

    @Modifying
    @Transactional
    @Query(value="delete from sys_user_jurisdiction where user_id = ?1 and  jurisdiction_id = ?2",nativeQuery=true)
    Integer allocationD(String userId,String jurisdictionId);
}
